# Shaderz cmake build config
# Author: Vijay Michael Joseph

# cmake min version. Haven't tested on older versions
cmake_minimum_required(VERSION 2.8)

# project name
project(shaderz)

# dependencies: Qt4
find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
include(${QT_USE_FILE})

#############################################
############## build shaderz ################
#############################################
# set the include path to new build of OpenSceneGraph, osgnv, cg, opengl and shaderz/include
INCLUDE_DIRECTORIES(
	${CMAKE_BINARY_DIR}
	inc
	inc/qt
	./ )

# setup for compiling shaderz
FILE(GLOB SOURCES src/*.cpp src/qt/*.cpp)
FILE(GLOB HEADERS inc/*.h src/qt/*.h)

# do Qt preprocessing
set( MOCS
		inc/qt/shnodeui_qt.h
		inc/qt/shnodecontainerwidget_qt.h
     )	 
qt4_wrap_cpp(GENERATED_SOURCES ${MOCS})



add_executable(
	shaderz
	MACOSX_BUNDLE
	WIN32
	${SOURCES}
	${GENERATED_SOURCES}
	${HEADERS}
	${FORMS})

target_link_libraries(
	shaderz   
	${QT_LIBRARIES}
	)
